import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from "../views/Home/Home.vue"
import Me from "../views/Me/Me.vue"
import Login from "../views/Login/Login.vue"
import Enroll from "../views/Enroll/Enroll.vue"
import Shop from "../views/Shop/Shop.vue"
import Gevind from "../views/Gevind/Gevind.vue"
import Mediese from "../views/Mediese/Mediese.vue"
import Detail from "../views/Detail/Detail.vue"
import Pats from "../views/Me/pats.vue"
import ShopDetail from "../views/ShopDetail/ShopDetail.vue"
import SetUP from "../views/Me/SetUp.vue"
import UserInfo from "../views/Me/UserInfo.vue"
import Address from "../views/Address/Address.vue"
import Order from "../views/Me/Order.vue"
import City from "../views/Address/City.vue"
import ShopCart from "../views/ShopCart/ShopCart.vue"
import "../icon/iconfont.css"
import DoctorDetail from '../views/DoctorDetail/DoctorDetail'
import Hospital_list from '../views/Hospital_list/Hospital_list'
import Hospital_lists from '../views/Hospital_list/Hospital_lists'
import DoctorList from '../views/DoctorList/DoctorList'
import Store_detail from '../views/Store_detail/Store_detail'
import Register from '../views/Register/Register'
import Orders from "../views/orders/index"
import OrdersAddress from "../views/orders/address"
import Registerlist from '../views/Register/Registerlist'
Vue.use(VueRouter)

export const routes = [{
  path: '/',
  name: 'Home',
  component: Home,
  meta: {
    til: "首页",
    keepAlive: true,
    i: "iconfont icon-chongwu1",
    avatice: "iconfont icon-chongwu"
  }
},
{
  path: '/mediese',
  name: "Mediese",
  component: Mediese,
  meta: {
    til: "医疗",
    keepAlive: true,
    i: "iconfont icon-yiyuan",
    avatice: "iconfont icon-yiyuantianchong"
  }
},
{
  path: '/gevind',
  name: "Gevind",
  component: Gevind,
  meta: {
    til: "发现",
    keepAlive: true,
    i: "el-icon-help",
    avatice: "el-icon-s-help"
  }
},
{
  path: '/shop',
  name: "Shop",
  component: Shop,
  meta: {
    til: "商城",
    keepAlive: true,
    i: "iconfont icon-shangcheng",
    avatice: "iconfont icon-shangcheng1"
  }
},
{
  path: '/me',
  name: 'Me',
  component: Me,
  meta: {
    til: "我的",
    keepAlive: true,
    i: "iconfont icon-wode",
    avatice: "iconfont icon-wode1"
  }
},


{
  path: '/login',
  name: 'Login',
  component: Login,
  hidden: true,
  meta: {
    til: "登录",
    keepAlive: false
  }
},
{
  path: '/enroll',
  name: 'Enroll',
  component: Enroll,
  hidden: true,
  meta: {
    til: "注册",
    keepAlive: false
  }
},
{
  path: '/detail/:id',
  name: 'Detail',
  component: Detail,
  hidden: true,
  meta: {
    til: "商品详情",
    keepAlive: false
  }
},
{
  path: '/pats',
  name: 'Pats',
  component: Pats,
  hidden: true,
  meta: {
    til: "宠物信息",
    keepAlive: false
  }
},
{
  path: '/shopdetail/:id',
  name: 'ShopDetail',
  component: ShopDetail,
  hidden: true,
  meta: {
    til: "店铺详情",
    keepAlive: false
  }
},
{
  path: '/SetUp',
  name: 'SetUp',
  component: SetUP,
  hidden: true,
  meta: {
    til: "账户设置",
    keepAlive: false
  }
},
{
  path: '/Address',
  name: 'Address',
  component: Address,
  hidden: true,
  meta: {
    til: "收货地址",
    keepAlive: false
  }
},
{
  path: '/Order/:index',
  name: 'Order',
  component: Order,
  hidden: true,
  meta: {
    til: "订单详情",
    keepAlive: false

  }
},
{
  path: '/City/:id',
  name: 'City',
  component: City,
  hidden: true,
  meta: {
    til: "修改地址",
    keepAlive: false
  }
},
{
  path: '/UserInfo',
  name: 'UserInfo',
  component: UserInfo,
  hidden: true,
  meta: {
    til: "我的资料",
    keepAlive: false
  }
},
{
  path: '/ShopCart',
  name: 'ShopCart',
  component: ShopCart,
  hidden: true,
  meta: {
    til: "购物车",
    keepAlive: false
  }
},

{
  path: '/DoctorDetail/:id',
  name: 'DoctorDetail',
  component: DoctorDetail,
  hidden: true,
  meta: {
    til: "医生详情",
    keepAlive: false
  }
},
{
  path: '/DoctorList',
  name: 'DoctorList',
  hidden: true,
  component: DoctorList,
  meta: {
    til: '全国名医',
    keepAlive: false
  }
},
{
  path: '/Hospital_list/:name',
  name: 'Hospital_list',
  component: Hospital_list,
  hidden: true,
  meta: {
    til: '医院列表',
    keepAlive: false
  }
},
{
  path: '/Store_detail/:id',
  name: 'Store_detail',
  component: Store_detail,
  hidden: true,
  meta: {
    til: '医院详情',
    keepAlive: false
  }
}, {
  path: '/Register/:id',
  name: 'Register',
  component: Register,
  hidden: true,
  meta: {
    til: '挂号',
    keepAlive: false
  }
}, {
  path: '/Hospital_lists',
  name: 'Hospital_lists',
  component: Hospital_lists,
  hidden: true,
  meta: {
    til: '医院列表s',
    keepAlive: false
  }
},
{
  path: '/Registerlist',
  name: 'Registerlist',
  component: Registerlist,
  hidden: true,
  meta: {
    til: '我的预约',
    keepAlive: false
  }
},
{
  path: '/Orders',
  name: 'Orders',
  component: Orders,
  hidden: true,
  meta: {
    til: '订单',
    keepAlive: false
  }
},
  {
    path: '/OrdersAddress',
    name: 'OrdersAddress',
    component: OrdersAddress,
    hidden: true,
    meta: {
      til: '选择地址',
      keepAlive: false
    }
  }]
const router = new VueRouter({
  routes
})
router.beforeEach((to, from, next) => {
  document.title = to.meta.til
  next()
})
export default router